#include "udp_server.hpp"
#include <memory>

using namespace Alpaca;
using namespace std;

void usage(string proc)
{
    cout << "Usage:\n\t" << proc << " port" << endl;
}

std::string transString(std::string request)
{
    for (auto &c : request)
    {
        if (islower(c))
            c = toupper(c);
    }
    return request;
}

int main(int argc, char *argv[])
{
    if (argc != 2)
    {
        usage(argv[0]);
        exit(USAGR_ERR);
    }

    uint16_t port = atoi(argv[1]);
    unique_ptr<UdpServer> usvr(new UdpServer(port));

    usvr->Start();
    return 0;
}